﻿<UserControl x:Class="FirstFloor.ModernUI.App.Pages.Navigation"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             xmlns:app="clr-namespace:FirstFloor.ModernUI.App"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Style="{StaticResource ContentRoot}">
        <Grid.Resources>
            <!-- define an implicit BBCodeBlock style and add custom commands to the link navigator -->
            <Style TargetType="mui:BBCodeBlock" >
                <Setter Property="LinkNavigator">
                    <Setter.Value>
                        <mui:DefaultLinkNavigator>
                            <mui:DefaultLinkNavigator.Commands>
                                <app:SampleDisabledCommand x:Key="cmd://disabled" />
                                <app:SampleMsgBoxCommand x:Key="cmd://msgbox" />
                                <app:SampleParameterCommand x:Key="cmd://parameter" />
                            </mui:DefaultLinkNavigator.Commands>
                        </mui:DefaultLinkNavigator>
                    </Setter.Value>
                </Setter>
            </Style>
        </Grid.Resources>

        <ScrollViewer>
            <StackPanel >
                <mui:BBCodeBlock BBCode="Demonstrating the use of link navigators with support for loading frame content, external link navigation and command execution. A link navigator implements the [b]ILinkNavigator[/b] interface and is typically associated with a [b]BBCodeBlock[/b]. The links below are supported by the [b]FirstFloor.ModernUI.DefaultLinkNavigator[/b]." Margin="0,0,0,16" />

                <TextBlock Text="CONTENT NAVIGATION" Style="{StaticResource Heading2}" />
                <mui:BBCodeBlock BBCode="» navigate to the [url=/Pages/Introduction.xaml]introduction page[/url]" />
                <mui:BBCodeBlock BBCode="» navigate to [url=http://www.google.com]http://www.google.com[/url] in the default browser" />
                <mui:BBCodeBlock BBCode="» send an email to [url=mailto:foo@test.com?subject=This%20is%20the%20subject&amp;body=This%20is%20the%20body]foo@test.com[/url]" Margin="0,0,0,16"/>
                <TextBlock Text="BUILTIN COMMANDS" Style="{StaticResource Heading2}" />
                <mui:BBCodeBlock BBCode="» set the theme to [url=cmd://darktheme]dark[/url], [url=cmd://lighttheme]light[/url] or use a [url=cmd://settheme|/ModernUIDemo;component/Assets/ModernUI.HelloKitty.xaml]custom theme[/url]" />
                <mui:BBCodeBlock BBCode="» set the font size to [url=cmd://largefontsize]large[/url] or [url=cmd://smallfontsize]small[/url]" />
                <mui:BBCodeBlock BBCode="» change the accent color to [url=cmd://accentcolor|#ff4500]orange[/url], [url=cmd://accentcolor|#339933]green[/url] or whatever [url=cmd://accentcolor|#9a0213]color you like[/url]" />
                <mui:BBCodeBlock BBCode="» navigate to the previous page using the [url=cmd://browseback]browse back[/url] command" Margin="0,0,0,16"/>
                <TextBlock Text="CUSTOM COMMANDS" Style="{StaticResource Heading2}" />
                <mui:BBCodeBlock BBCode="» show a [url=cmd://msgbox]message box[/url]" />
                <mui:BBCodeBlock BBCode="» a command that cannot execute, resulting in a [url=cmd://disabled]disabled hyperlink[/url]" />
                <mui:BBCodeBlock BBCode="» passing a parameter to a [url=cmd://parameter|my%20parameter]command[/url]" Margin="0,0,0,16" />
                <mui:BBCodeBlock BBCode="Visit the [url=http://mui.codeplex.com/documentation]online documentation[/url] to learn more about [b]ILinkNavigator[/b]." Margin="0,0,0,16" />
            </StackPanel>
        </ScrollViewer>
    </Grid>
</UserControl>
